package com.strp.mptcp.ACK;

import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufAllocator;

// 单序号重传请求
public class RetransmissionRequestHeader {
    public static final byte TYPE = 3;
    private final long seq;

    public RetransmissionRequestHeader(long seq) {
        this.seq = seq;
    }

    public ByteBuf toByteBuf() {
        ByteBuf buf = ByteBufAllocator.DEFAULT.buffer(1 + 8);
        buf.writeByte(TYPE);
        buf.writeLong(seq);
        return buf;
    }
}
